home *** CD-ROM | disk | FTP | other *** search
- // Wait for next round of user input
- // if password attempt fails.
- // Michael J. Campbell
-
- #include <dos.h>
- #include <stdio.h>
- #include <graphics.h>
-
- void wait(void)
- {
- char wait[50];
-
- // Draw timer box
- setfillstyle(SOLID_FILL,LIGHTGRAY);
- bar(203,203,437,287);
- settextstyle(SMALL_FONT,HORIZ_DIR,4);
- settextjustify(CENTER_TEXT,CENTER_TEXT);
- setcolor(BLACK);
-
- // Timer loop, archaic but it works ok
- for(int count = 45; count >= 0; count--)
- {
-
- sprintf(wait,"Try Again In: %02d Seconds",count);
- outtextxy(320,245,wait);
- delay(1000);
- bar(203,230,437,260); // Clear box
-
- }
- }